package com.xiangxiao.rpan.data.consumer;

import com.alibaba.fastjson.JSONObject;
import com.xiangxiao.rpan.data.consumer.callback.AuthorityClientCall;
import com.xiangxiao.rpan.data.dto.QueryUsersByTopicDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;

/**
 * @auther xiangxiao
 * @email 573768011@qq.com
 * @data 2024/7/2 17:02
 */
@Component
@FeignClient(value = "rpan-authority", fallback = AuthorityClientCall.class)
//@FeignClient(value = "rpan-authority", url = "http://120.53.237.127:32018", fallback = AuthorityClientCall.class)
public interface IConsumerAuthorityClient {
  @RequestMapping(value = "/topic/query/userList", method = RequestMethod.POST)
  JSONObject queryUserIdsByTopic(@Valid @RequestBody QueryUsersByTopicDto ueryUsersByTopicDto);
}
